//
//  WMEBaseModel.m
//  everyDay_duiTang
///Users/enshu/douban/UI11_homework/UI11_homework/DBModel.h
//  Created by 恩叔 on 16/1/15.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEBaseModel.h"

@implementation WMEBaseModel
- (instancetype)initWithDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (instancetype)modelWithDictionary:(NSDictionary *)dic
{
    id m = [[[self class] alloc] initWithDictionary:dic];
    return m;
}

+ (NSMutableArray *)modelHandlerWithArray:(NSArray *)arr
{
    NSMutableArray *mArr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        id m = [[self class] modelWithDictionary:dic];
        [mArr addObject:m];
    }
    return mArr;
}

@end
